<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('users', function (Blueprint $table) {
            // 性别
            $table->unsignedSmallInteger('gender')->default(0)->comment('性别')->after('height');
            // 生日
            $table->string('birthday', 24)->default('')->comment('生日')->after('height');
            // 经验
            $table->unsignedInteger('experience')->default(0)->comment('经验')->after('height');
            // 成就
            $table->string('achievement', 24)->default('')->comment('成就')->after('height');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn('gender');
            $table->dropColumn('birthday');
            $table->dropColumn('experience');
            $table->dropColumn('achievement');
        });
    }
};
